package com.tmall.tmall.service;

import com.tmall.tmall.pojo.PageRt;
import com.tmall.tmall.pojo.User;
import com.tmall.tmall.pojo.UserLogin;

import java.security.NoSuchAlgorithmException;
import java.util.List;

public interface UserService {
    User getById(Integer id);

    User login(UserLogin user) throws NoSuchAlgorithmException;

    User getByName(UserLogin userLogin);

    void insert(UserLogin userLogin) throws NoSuchAlgorithmException;

    PageRt page(Integer pageNum, Integer pageSize, String name);

    void update(User user) throws NoSuchAlgorithmException;

    void deleteByIds(List<Integer> ids);

    void updatePassword(Integer id, String oldPassword, String newPassword) throws NoSuchAlgorithmException;
}
